import 'package:flutter2/generated/json/base/json_convert_content.dart';
import 'package:flutter2/model/order_entity.dart';

OrderEntity $OrderEntityFromJson(Map<String, dynamic> json) {
  final OrderEntity orderEntity = OrderEntity();
  final String? orderNo = jsonConvert.convert<String>(json['mannerno']);
  if (orderNo != null) {
    orderEntity.orderNo = orderNo;
  }
  final int? orderId = jsonConvert.convert<int>(json['correspondacquiregrass']);
  if (orderId != null) {
    orderEntity.orderId = orderId;
  }
  final String? extend = jsonConvert.convert<String>(json['creatureabsolutediffer']);
  if (extend != null) {
    orderEntity.extend = extend;
  }
  final String? name = jsonConvert.convert<String>(json['printfifthreally']);
  if (name != null) {
    orderEntity.name = name;
  }
  final int? status = jsonConvert.convert<int>(json['couplefeastattitude']);
  if (status != null) {
    orderEntity.status = status;
  }
  final String? introducedelicateomelette = jsonConvert.convert<String>(json['introducedelicateomelette']);
  if (introducedelicateomelette != null) {
    orderEntity.introducedelicateomelette = introducedelicateomelette;
  }
  final int? loanAmount = jsonConvert.convert<int>(json['clock']);
  if (loanAmount != null) {
    orderEntity.loanAmount = loanAmount;
  }
  final String? appssid = jsonConvert.convert<String>(json['oilstrugglesharpen']);
  if (appssid != null) {
    orderEntity.appssid = appssid;
  }
  final int? userId = jsonConvert.convert<int>(json['headlinesacrificewho']);
  if (userId != null) {
    orderEntity.userId = userId;
  }
  final String? loanTime = jsonConvert.convert<String>(json['institutiondialogueheel']);
  if (loanTime != null) {
    orderEntity.loanTime = loanTime;
  }
  final int? period = jsonConvert.convert<int>(json['pioneerregardlesspeasant']);
  if (period != null) {
    orderEntity.period = period;
  }
  final int? overDays = jsonConvert.convert<int>(json['lostresistdictionary']);
  if (overDays != null) {
    orderEntity.overDays = overDays;
  }
  return orderEntity;
}

Map<String, dynamic> $OrderEntityToJson(OrderEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['mannerno'] = entity.orderNo;
  data['correspondacquiregrass'] = entity.orderId;
  data['creatureabsolutediffer'] = entity.extend;
  data['printfifthreally'] = entity.name;
  data['couplefeastattitude'] = entity.status;
  data['introducedelicateomelette'] = entity.introducedelicateomelette;
  data['clock'] = entity.loanAmount;
  data['oilstrugglesharpen'] = entity.appssid;
  data['headlinesacrificewho'] = entity.userId;
  data['institutiondialogueheel'] = entity.loanTime;
  data['pioneerregardlesspeasant'] = entity.period;
  data['lostresistdictionary'] = entity.overDays;
  return data;
}

extension OrderEntityExtension on OrderEntity {
  OrderEntity copyWith({
    String? orderNo,
    int? orderId,
    String? extend,
    String? name,
    int? status,
    String? introducedelicateomelette,
    int? loanAmount,
    String? appssid,
    int? userId,
    String? loanTime,
    int? period,
    int? overDays,
  }) {
    return OrderEntity()
      ..orderNo = orderNo ?? this.orderNo
      ..orderId = orderId ?? this.orderId
      ..extend = extend ?? this.extend
      ..name = name ?? this.name
      ..status = status ?? this.status
      ..introducedelicateomelette = introducedelicateomelette ?? this.introducedelicateomelette
      ..loanAmount = loanAmount ?? this.loanAmount
      ..appssid = appssid ?? this.appssid
      ..userId = userId ?? this.userId
      ..loanTime = loanTime ?? this.loanTime
      ..period = period ?? this.period
      ..overDays = overDays ?? this.overDays;
  }
}